<?php
namespace app\banquet\controller;
use app\AdminRest;


use app\ApiRest;
use app\banquet\model\Config;
use app\banquet\model\Evaluate;
use app\banquet\model\Order;
use app\banquet\model\Package;
use app\banquet\model\Place;
use app\banquet\model\PlaceDate;
use app\banquet\model\PlaceIv;
use app\banquet\model\Refund;
use app\card\model\Company;
use app\card\model\User;
use app\card\model\UserInfo;
use think\App;
use think\facade\Db;


class IndexStaff extends ApiRest
{

    protected $model;

    protected $date_model;

    protected $package_model;



    public function __construct(App $app) {

        parent::__construct($app);

        $this->model  = new Place();

        $this->date_model  = new PlaceDate();

        $this->package_model  = new Package();


    }



    /**
     * @author chenniang
     * @DataTime: 2022-01-07 15:28
     * @功能说明:订单列表
     */
    public function orderList(){

        $input = $this->_param;

        $order_model = new Order();

        $dis = [

            'staff_id' => $this->getUserId(),

            'uniacid' => $this->_uniacid
        ];

        if(!empty($input['pay_type'])){

            $dis['pay_type'] = $input['pay_type'];
        }

        $data = $order_model->dataList($dis);

        return $this->success($data);

    }


    /**
     * @author chenniang
     * @DataTime: 2022-01-07 15:34
     * @功能说明:订单详情
     */
    public function orderInfo(){

        $input = $this->_param;

        $order_model = new Order();

        $dis = [

            'id' => $input['id'],

        ];

        $data = $order_model->dataInfo($dis);

        return $this->success($data);
    }











}
